﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AddIn.EA.Architecture.ComponentLogic.StandardProject.Domains
{
    public class LayerProcess : BaseDomain
    {
        public LayerProcess(Int32 id, String description) : base(id, description) { }

        public static LayerProcess CommunicationProcess = new LayerProcess(0, "CommunicationProcess");
        public static LayerProcess ProcessClient = new LayerProcess(1, "ProcessClient");
        public static LayerProcess ProcessImplementation = new LayerProcess(2, "ProcessImplementation");
        public static LayerProcess ProcessLogic = new LayerProcess(3, "ProcessLogic");
        public static LayerProcess ProcessEntity = new LayerProcess(4, "ProcessEntity");
        public static LayerProcess ResourceAccess = new LayerProcess(5, "ResourceAccess");
        public static LayerProcess Communication = new LayerProcess(6, "Communication");

        public LayerProcess GetOne(int id)
        {
            return GetAll().Find(it => it.ID.CompareTo(id) == 0);
        }
        public List<LayerProcess> GetAll()
        {
            List<LayerProcess> list = new List<LayerProcess>();
            list.Add(CommunicationProcess);
            list.Add(ProcessClient);
            list.Add(ProcessImplementation);
            list.Add(ProcessLogic);
            list.Add(ProcessEntity);
            list.Add(ResourceAccess);
            list.Add(Communication);
            return list;
        }
    }
}
